package com.us.usws.site.ws.resource;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.us.usws.model.domain.Meeting;
import com.us.usws.service.ro.MeetingROService;
import com.us.usws.site.ws.entity.WSEntity;
import com.us.usws.site.ws.entity.shared.WSSharedEntityPackGenerator;
import com.us.usws.support.uitls.ServiceFactory;

/**
 * User webservice
 */
@Path("/meetings")
public class MeetingResource {

	//private static Log log = LogFactory.getFactory().getInstance(ChannelResource.class);

	private MeetingROService mService = ServiceFactory.getInstance().getService(MeetingROService.class);

	@GET
	@Path("/{meetingUid}.json")
	//@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
	@Produces(MediaType.APPLICATION_JSON)
	public WSEntity getMeetingInfo(@PathParam("meetingUid") String meetingUid) {

		Meeting m = mService.getMeeting(meetingUid);

		WSEntity ret = WSSharedEntityPackGenerator.getInstance().getMeetingPack(m);

		return ret;
	}

}
